package cn.iocoder.yudao.module.call.dal.mysql.ivrkeywords;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.call.dal.dataobject.ivrkeywords.IvrKeywordsDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.call.controller.admin.ivrkeywords.vo.*;

/**
 * ivr关键字 Mapper
 *
 * @author 数创万维
 */
@Mapper
public interface IvrKeywordsMapper extends BaseMapperX<IvrKeywordsDO> {

    default PageResult<IvrKeywordsDO> selectPage(IvrKeywordsPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<IvrKeywordsDO>()
                .eqIfPresent(IvrKeywordsDO::getBranch, reqVO.getBranch())
                .eqIfPresent(IvrKeywordsDO::getKeys, reqVO.getKeys())
                .betweenIfPresent(IvrKeywordsDO::getCreateTime, reqVO.getCreateTime())
                .eqIfPresent(IvrKeywordsDO::getType, reqVO.getType())
                .orderByDesc(IvrKeywordsDO::getId));
    }

}